gtk4.git
5 years agoMerge branch 'ebassi/ci-cleanup-master' into 'master'
Matthias Clasen [Wed, 17 Jun 2020 15:06:44 +0000 (15:06 +0000)]
Merge branch 'ebassi/ci-cleanup-master' into 'master'

Small clean ups for the CI file

See merge request GNOME/gtk!2102

5 years agoci: Move backend Meson flags into a variable
Emmanuele Bassi [Mon, 8 Jun 2020 10:35:49 +0000 (11:35 +0100)]
ci: Move backend Meson flags into a variable

So we don't have to copy them around.

5 years agoci: Move images into environment variables
Emmanuele Bassi [Mon, 8 Jun 2020 10:00:20 +0000 (11:00 +0100)]
ci: Move images into environment variables

Currently we have to hunt all the `image` keys when updating the image
in use for a job. We should centralise them all at the top of the file,
so they are easy to update in one simple change.

5 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 17 Jun 2020 11:54:04 +0000 (13:54 +0200)]
Updated Spanish translation

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Wed, 17 Jun 2020 08:28:31 +0000 (08:28 +0000)]
Update Ukrainian translation

5 years agoMerge branch 'page-setup-combos' into 'master'
Matthias Clasen [Tue, 16 Jun 2020 20:00:13 +0000 (20:00 +0000)]
Merge branch 'page-setup-combos' into 'master'

Page setup combos

See merge request GNOME/gtk!2100

5 years agoMerge branch 'wip/jimmac/dropdown-styling' into 'master'
Matthias Clasen [Tue, 16 Jun 2020 19:52:51 +0000 (19:52 +0000)]
Merge branch 'wip/jimmac/dropdown-styling' into 'master'

Adwaita: dropdown styling

Closes #2846

See merge request GNOME/gtk!2101

5 years agoAdwaita: dropdown styling
Jakub Steiner [Mon, 15 Jun 2020 13:18:04 +0000 (15:18 +0200)]
Adwaita: dropdown styling

- selected item color
- offset dropdown form the parent control
- special styling for the top search entry

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2846

5 years agopagesetupdialog: Convert the printer combo
Matthias Clasen [Tue, 16 Jun 2020 01:57:39 +0000 (21:57 -0400)]
pagesetupdialog: Convert the printer combo

Turn the printer combo into a dropdown.

5 years agopagesetupdialog: Port the papersize combo
Matthias Clasen [Tue, 16 Jun 2020 00:31:27 +0000 (20:31 -0400)]
pagesetupdialog: Port the papersize combo

Turn the papersize combo into a dropdown.

5 years agoDrop unused includes
Matthias Clasen [Tue, 16 Jun 2020 16:06:34 +0000 (12:06 -0400)]
Drop unused includes

This is just cleanup to help tracking down
remaining GtkComboBox uses.

5 years agoquartz: added open capability to gtk_application
Friedrich Beckmann [Tue, 16 Jun 2020 14:59:06 +0000 (16:59 +0200)]
quartz: added open capability to gtk_application

This patch implements the openFiles delegate which is required
to open files which are associated with an application via the
Finder or via open on the command line. The patch has been
proposed by jessevdk@gmail.com.

See: https://gitlab.gnome.org/GNOME/gtk/-/issues/463

I tested the patch with the GNU pspp application on MacOS with
the quartz backend.

5 years agoUpdate POTFILES.in
Piotr Drąg [Tue, 16 Jun 2020 16:16:43 +0000 (18:16 +0200)]
Update POTFILES.in

5 years agoMerge branch 'wip/ricotz/cleanup' into 'master'
Emmanuele Bassi [Tue, 16 Jun 2020 15:05:25 +0000 (15:05 +0000)]
Merge branch 'wip/ricotz/cleanup' into 'master'

gdk: Drop gdk_device_get_axis_value leftovers

See merge request GNOME/gtk!2097

5 years agoMerge branch 'cherry-pick-947c3e9f' into 'master'
Benjamin Otte [Tue, 16 Jun 2020 13:57:49 +0000 (13:57 +0000)]
Merge branch 'cherry-pick-947c3e9f' into 'master'

Merge branch 'benzea/fix-css-update' into 'gtk-3-24'

See merge request GNOME/gtk!2096

5 years agogdk: Drop gdk_device_get_axis_value leftovers
Rico Tzschichholz [Tue, 16 Jun 2020 13:31:29 +0000 (15:31 +0200)]
gdk: Drop gdk_device_get_axis_value leftovers

5 years agoMerge branch 'benzea/fix-css-update' into 'gtk-3-24'
Benjamin Otte [Mon, 15 Jun 2020 20:13:56 +0000 (20:13 +0000)]
Merge branch 'benzea/fix-css-update' into 'gtk-3-24'

Fix CSS update loop

See merge request GNOME/gtk!2093

(cherry picked from commit 947c3e9f723ef733ab46e4dce34fa41b91cb0604)

7a5caf1b cssnode: Don't queue_validate/deque_validate invisible nodes

5 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 16 Jun 2020 07:47:37 +0000 (09:47 +0200)]
Updated Spanish translation

5 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 16 Jun 2020 07:46:49 +0000 (09:46 +0200)]
Updated Spanish translation

5 years agoMerge branch 'printer-combo-conversion' into 'master'
Matthias Clasen [Tue, 16 Jun 2020 05:02:44 +0000 (05:02 +0000)]
Merge branch 'printer-combo-conversion' into 'master'

Printer combo conversion

See merge request GNOME/gtk!2095

5 years agofontchooser: Drop unused includes
Matthias Clasen [Mon, 15 Jun 2020 22:15:58 +0000 (18:15 -0400)]
fontchooser: Drop unused includes

5 years agotext: Drop unused includes
Matthias Clasen [Mon, 15 Jun 2020 22:14:06 +0000 (18:14 -0400)]
text: Drop unused includes

5 years agoprintdialog: Convert some leftover code
Matthias Clasen [Mon, 15 Jun 2020 21:54:49 +0000 (17:54 -0400)]
printdialog: Convert some leftover code

There was still some code expecting to deal with tree
models. Convert it to work with list models.

5 years agopagesetupdialog: Drop the Private struct
Matthias Clasen [Mon, 15 Jun 2020 20:33:11 +0000 (16:33 -0400)]
pagesetupdialog: Drop the Private struct

We don't need it here.

5 years agopaperdialog: Convert the printer combo
Matthias Clasen [Sun, 14 Jun 2020 12:30:54 +0000 (08:30 -0400)]
paperdialog: Convert the printer combo

Use a GtkDropDown for the printer combo.

5 years agoMerge branch 'fix-notebook-tabs' into 'master'
Matthias Clasen [Mon, 15 Jun 2020 20:42:53 +0000 (20:42 +0000)]
Merge branch 'fix-notebook-tabs' into 'master'

Fix notebook tabs

Closes #2842 and #2841

See merge request GNOME/gtk!2092

5 years agonotebook: Don't capture clicks
Matthias Clasen [Mon, 15 Jun 2020 18:16:45 +0000 (14:16 -0400)]
notebook: Don't capture clicks

Using the bubble works just fine here, and keeps buttons
in notebook tabs working without side-effects.

Fixes: #2841
5 years agoMerge branch 'michaelweghorn/master_issue1820_gtkfilechoosernativeportal_get_filter...
Matthias Clasen [Mon, 15 Jun 2020 17:49:17 +0000 (17:49 +0000)]
Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernativeportal_get_filter' into 'master'

Make gtk_file_chooser_get_filter work for portal case (issue #1820, master)

Closes #1820

See merge request GNOME/gtk!2070

5 years agosearchentry: Fix keynav
Matthias Clasen [Mon, 15 Jun 2020 17:45:57 +0000 (13:45 -0400)]
searchentry: Fix keynav

Shift-Tabbing was getting stuck in GtkSearchEntry and
GtkPasswordEntry, since they grab the focus to a child
of theirs. Copy the same fix that we are already using
in GtkEntry.

Fixes: #2842
5 years agodocs: Cosmetics
Matthias Clasen [Mon, 15 Jun 2020 17:45:28 +0000 (13:45 -0400)]
docs: Cosmetics

Remove a few instances of GTK+ in the docs.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 15 Jun 2020 17:01:25 +0000 (17:01 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

button: Center images

See merge request GNOME/gtk!2090

5 years agoMerge branch 'editable-label' into 'master'
Matthias Clasen [Mon, 15 Jun 2020 16:47:57 +0000 (16:47 +0000)]
Merge branch 'editable-label' into 'master'

Editable label

See merge request GNOME/gtk!2081

5 years agobutton: Center images
Matthias Clasen [Mon, 15 Jun 2020 16:23:32 +0000 (12:23 -0400)]
button: Center images

If we leave the valign to be the default fill, then
the images pick up baseline alignment from the environment,
which can occasionally lead to misplaced -/+ icons in
spinbuttons, for example in the "Page Setup" tab of
the print dialog.

5 years agopaperdialog: Port to use GtkListView
Matthias Clasen [Fri, 12 Jun 2020 18:11:16 +0000 (14:11 -0400)]
paperdialog: Port to use GtkListView

Use GtkListView and GtkEditableLabel here.

5 years agogtk-demo: Use editable labels in the settings demo
Matthias Clasen [Fri, 12 Jun 2020 15:07:37 +0000 (11:07 -0400)]
gtk-demo: Use editable labels in the settings demo

This is more in line with the expected behavior for
editable lists.

5 years agoAdd a GtkEditableLabel widget
Matthias Clasen [Fri, 12 Jun 2020 15:07:07 +0000 (11:07 -0400)]
Add a GtkEditableLabel widget

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 15 Jun 2020 16:01:22 +0000 (16:01 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

inspector: Don't set style classes on app widgets

See merge request GNOME/gtk!2089

5 years agoinspector: Don't set style classes on app widgets
Matthias Clasen [Mon, 15 Jun 2020 15:21:20 +0000 (11:21 -0400)]
inspector: Don't set style classes on app widgets

Due to a mixup, the inspector was setting .dim-label on
widgets that get unmapped, instead of the labels representing
them in the object tree.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 15 Jun 2020 15:05:14 +0000 (15:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

dropdown: Style fixups

See merge request GNOME/gtk!2088

5 years agodropdown: Style fixups
Matthias Clasen [Mon, 15 Jun 2020 14:23:39 +0000 (10:23 -0400)]
dropdown: Style fixups

Make the dropdown popover have a .menu style class,
and add padding to the rows in the popover. Also,
make the popover left-aligned with the button.

5 years agoMerge branch 'final-frame-clock-work' into 'master'
Alexander Larsson [Mon, 15 Jun 2020 10:27:02 +0000 (10:27 +0000)]
Merge branch 'final-frame-clock-work' into 'master'

Final frame clock work

See merge request GNOME/gtk!2087

5 years agoframe clock: fix scheduling
Yariv Barkan [Wed, 10 Jun 2020 07:54:07 +0000 (10:54 +0300)]
frame clock: fix scheduling

Fix scheduling of the frame clock when we don't receive "frame drawn"
messages from the compositor.

If we received "frame drawn" events recently, then the "smooth frame
time" would be in sync with the vsync time. When we don't receive frame
drawn events, the "smooth frame time" is simply incremented by constant
multiples of the refresh interval. In both cases we can use this smooth
time as the basis for scheduling the next clock cycle.

By only using the "smooth frame time" as a basis we also benefit from
more consistent scheduling cadence. If, for example, we got "frame
drawn" events, then didn't receive them for a few frames, we would still
be in sync when we start receiving these events again.

5 years agoframe clock: adjust reported frame time
Yariv Barkan [Wed, 10 Jun 2020 07:45:14 +0000 (10:45 +0300)]
frame clock: adjust reported frame time

When an animation is started while the application is idle, that often
happens as a result of some external event. This can be an input event,
an expired timer, data arriving over the network etc. The result is that
the first animation clock cycle could be scheduled at some random time,
as opposed to follow up cycles which are usually scheduled right after a
vsync.

Since the frame time we report to the application is correlated to the
time when the frame clock was scheduled to run, this can result in
uneven times reported in the first few animation frames. In order to fix
that, we measure the phase of the first clock cycle - i.e. the offset
between the first cycle and the preceding vsync. Once we start receiving
"frame drawn" signals, the cadence of the frame clock scheduling becomes
tied to the vsync. In order to maintain the regularity of the reported
frame times, we adjust subsequent reported frame times with the
aforementioned phase.

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Mon, 15 Jun 2020 06:33:54 +0000 (06:33 +0000)]
Update Ukrainian translation

5 years agoMerge branch 'mingw-x64-compiler-warnings' into 'master'
Matthias Clasen [Mon, 15 Jun 2020 01:26:45 +0000 (01:26 +0000)]
Merge branch 'mingw-x64-compiler-warnings' into 'master'

Fix various compiler warnings with the 64bit mingw build

See merge request GNOME/gtk!2020

5 years agoMerge branch 'fix-spin-button-auto-sizing' into 'master'
Matthias Clasen [Sun, 14 Jun 2020 22:06:16 +0000 (22:06 +0000)]
Merge branch 'fix-spin-button-auto-sizing' into 'master'

spinbutton: Bring back auto-sizing

See merge request GNOME/gtk!2085

5 years agoCI: Switch to 64bit mingw for the MSYS2 job
Christoph Reiter [Sun, 14 Jun 2020 18:02:46 +0000 (20:02 +0200)]
CI: Switch to 64bit mingw for the MSYS2 job

64 bit is more common now and also tests more things because
sizeof(glong) != sizeof(gpointer)

5 years agoFix various compiler warnings with the 64bit mingw build
Christoph Reiter [Tue, 2 Jun 2020 18:41:38 +0000 (20:41 +0200)]
Fix various compiler warnings with the 64bit mingw build

Use better matching format modifiers/specifiers, initialise some things
which in theory wont be written to because of getters using g_return_if_fail(),
a cast, and gsize as input for malloc because gsize!=glong on 64bit Windows.

5 years agoMerge branch 'tchaik/fix-lpr-build' into 'master'
Matthias Clasen [Sun, 14 Jun 2020 14:57:42 +0000 (14:57 +0000)]
Merge branch 'tchaik/fix-lpr-build' into 'master'

Fix the lpr print backend build (redundant-decls)

See merge request GNOME/gtk!2084

5 years agospinbutton: Bring back auto-sizing
Matthias Clasen [Sun, 14 Jun 2020 13:12:49 +0000 (09:12 -0400)]
spinbutton: Bring back auto-sizing

We lost this when GtkSpinButton was first ported
to the new editable regime, and then the GtkBoxLayout.

Bring it back, but without text measurement, by overriding
width-chars for the GtkText inside, and only do it if
GtkSpinButton::width-chars is unset (ie -1).

Also adjust the documentation slightly to point out
how auto-sizing can be turned off.

5 years agoFix the lpr print backend build (redundant-decls)
Martin Blanchard [Sun, 14 Jun 2020 14:13:37 +0000 (16:13 +0200)]
Fix the lpr print backend build (redundant-decls)

Class and instance _init() functions are already declared by
G_DEFINE_DYNAMIC_TYPE ().

5 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sat, 13 Jun 2020 20:19:00 +0000 (20:19 +0000)]
Update Basque translation

5 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sat, 13 Jun 2020 19:40:17 +0000 (19:40 +0000)]
Update Basque translation

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sat, 13 Jun 2020 16:17:49 +0000 (16:17 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

widget-factory: Make the print dialog more functional

See merge request GNOME/gtk!2083

5 years agowidget-factory: Make the print dialog more functional
Matthias Clasen [Sat, 13 Jun 2020 12:59:21 +0000 (08:59 -0400)]
widget-factory: Make the print dialog more functional

Allow opening the papersize dialog.

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sat, 13 Jun 2020 11:45:35 +0000 (11:45 +0000)]
Update Ukrainian translation

5 years agoUpdate POTFILES.in and POTFILES.skip
Piotr Drąg [Sat, 13 Jun 2020 10:48:27 +0000 (12:48 +0200)]
Update POTFILES.in and POTFILES.skip

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 12 Jun 2020 21:53:48 +0000 (21:53 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

paperdialog: Drop the private struct

See merge request GNOME/gtk!2082

5 years agopaperdialog: Drop the private struct
Matthias Clasen [Fri, 12 Jun 2020 16:52:47 +0000 (12:52 -0400)]
paperdialog: Drop the private struct

Not needed here.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 12 Jun 2020 16:39:46 +0000 (16:39 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2080

5 years agoMerge branch 'fix-custom-paper-dialog' into 'master'
Matthias Clasen [Fri, 12 Jun 2020 14:01:17 +0000 (14:01 +0000)]
Merge branch 'fix-custom-paper-dialog' into 'master'

Fix the custom paper dialog

See merge request GNOME/gtk!2078

5 years agoprintdialog: Replace the papersize combo with a dropdown
Matthias Clasen [Fri, 12 Jun 2020 12:28:59 +0000 (08:28 -0400)]
printdialog: Replace the papersize combo with a dropdown

This one is more complicated, since it involves
separators and a custom item.

5 years agoAdwaita: Allow separators on individual list items
Matthias Clasen [Fri, 12 Jun 2020 13:20:46 +0000 (09:20 -0400)]
Adwaita: Allow separators on individual list items

Allow setting a .separator style class on list items
to put a separator before the item.

5 years agoprintdialog: Replace some combo boxes with drop downs
Matthias Clasen [Thu, 11 Jun 2020 22:10:42 +0000 (18:10 -0400)]
printdialog: Replace some combo boxes with drop downs

These are just the simple cases.

5 years agoprinteroptionwidget: Port to GtkDropDown
Matthias Clasen [Thu, 11 Jun 2020 23:59:35 +0000 (19:59 -0400)]
printeroptionwidget: Port to GtkDropDown

Use GtkDropDown instead of GtkComboBox in the print dialog.

5 years agotestdropdown: Add some more tests
Matthias Clasen [Fri, 12 Jun 2020 03:25:58 +0000 (23:25 -0400)]
testdropdown: Add some more tests

Add a homegrown combobox entry replacement that
combines a dropdown with a plain entry.

5 years agodropdown: Make the stack nonhomogeneous
Matthias Clasen [Fri, 12 Jun 2020 03:24:36 +0000 (23:24 -0400)]
dropdown: Make the stack nonhomogeneous

Without this, the (None) in the empty page forces
the button to have a large minimum width, even when
we don't put a widget in it.

5 years agoFix the custom paper dialog
Matthias Clasen [Fri, 12 Jun 2020 12:46:18 +0000 (08:46 -0400)]
Fix the custom paper dialog

This broke during the container removal.

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Fri, 12 Jun 2020 06:40:07 +0000 (06:40 +0000)]
Update Ukrainian translation

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 11 Jun 2020 23:44:48 +0000 (23:44 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2077

5 years agodropdown: Make the popup as wide as the button
Matthias Clasen [Thu, 11 Jun 2020 22:29:58 +0000 (18:29 -0400)]
dropdown: Make the popup as wide as the button

Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.

5 years agoiconbrowser: Drop app menu leftovers
Matthias Clasen [Sun, 7 Jun 2020 13:08:10 +0000 (09:08 -0400)]
iconbrowser: Drop app menu leftovers

We don't use menus.ui anymore, so don't put it in a resource.

5 years agoAdwaita: bring dropdown arrows back
Matthias Clasen [Thu, 11 Jun 2020 22:09:12 +0000 (18:09 -0400)]
Adwaita: bring dropdown arrows back

These got lost when the css name changed from combobox
to dropdown.

5 years agodocs: Cosmetics
Matthias Clasen [Thu, 11 Jun 2020 21:25:57 +0000 (17:25 -0400)]
docs: Cosmetics

Remove a few instances of GTK+ from the docs, and
remove references to ancient versions.

5 years agoMerge branch 'recent-model' into 'master'
Matthias Clasen [Thu, 11 Jun 2020 20:58:52 +0000 (20:58 +0000)]
Merge branch 'recent-model' into 'master'

Add a list model for recent files

See merge request GNOME/gtk!2073

5 years agotestcolumnview: Add recent file support
Matthias Clasen [Wed, 10 Jun 2020 23:55:58 +0000 (19:55 -0400)]
testcolumnview: Add recent file support

Use testcolumnview --recent to see recent files.

5 years agoAdd GtkBookmarkList
Matthias Clasen [Wed, 10 Jun 2020 21:03:13 +0000 (17:03 -0400)]
Add GtkBookmarkList

This is a listmodel similar to GtkDirectoryList,
for tracking recent files.

5 years agoMerge branch 'property-selection-getters' into 'master'
Matthias Clasen [Thu, 11 Jun 2020 13:08:47 +0000 (13:08 +0000)]
Merge branch 'property-selection-getters' into 'master'

propertyselection: Add getters

See merge request GNOME/gtk!2075

5 years agopropertyselection: Add getters
Matthias Clasen [Thu, 11 Jun 2020 11:15:27 +0000 (07:15 -0400)]
propertyselection: Add getters

These were missing.

5 years agoMerge branch 'michaelweghorn/master_issue1820_gtkfilechoosernative_get_filter' into...
Matthias Clasen [Wed, 10 Jun 2020 14:47:36 +0000 (14:47 +0000)]
Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernative_get_filter' into 'master'

filechoosernative: Make get_filter work for (non-portal) native chooser (master, issue #1820)

Closes #1820

See merge request GNOME/gtk!2069

5 years agoMerge branch 'wip/carlosg/zoom-no-touchpad-warnings' into 'master'
Emmanuele Bassi [Wed, 10 Jun 2020 14:35:10 +0000 (14:35 +0000)]
Merge branch 'wip/carlosg/zoom-no-touchpad-warnings' into 'master'

gtkgesturezoom: Do not check touchpad phase on generic events

Closes #2825

See merge request GNOME/gtk!2071

5 years agoMerge branch 'scroll-compression' into 'master'
Matthias Clasen [Wed, 10 Jun 2020 14:35:01 +0000 (14:35 +0000)]
Merge branch 'scroll-compression' into 'master'

gdk: Compress scroll events

Closes #2800

See merge request GNOME/gtk!2066

5 years agoMerge branch 'device-cleanup' into 'master'
Matthias Clasen [Wed, 10 Jun 2020 13:06:13 +0000 (13:06 +0000)]
Merge branch 'device-cleanup' into 'master'

Device cleanup

See merge request GNOME/gtk!2068

5 years agoUpdate Japanese translation
sicklylife [Wed, 10 Jun 2020 12:34:42 +0000 (12:34 +0000)]
Update Japanese translation

5 years agogtkgesturezoom: Do not check touchpad phase on generic events
Carlos Garnacho [Wed, 10 Jun 2020 12:27:14 +0000 (14:27 +0200)]
gtkgesturezoom: Do not check touchpad phase on generic events

This gesture handles both individual touch events and touchpad gesture
events, and was checking the touchpad phase in generic code paths. This
is dubious since event methods error out on the wrong GdkEventTypes.

Check the touchpad gesture phase within the branch handling touchpad
events, and make it clear which is the gesture phase of all that we are
ignoring.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2825
5 years agoUpdate Japanese translation
sicklylife [Wed, 10 Jun 2020 12:18:55 +0000 (12:18 +0000)]
Update Japanese translation

5 years agogdk: Drop axis labels
Matthias Clasen [Tue, 9 Jun 2020 19:26:04 +0000 (15:26 -0400)]
gdk: Drop axis labels

This was only ever implemented on X11, and the labels
here were atom names, so unlikely to be useful for
anything interesting.

5 years agoMerge branch 'win32-use-g-stat' into 'master'
Alexander Larsson [Wed, 10 Jun 2020 07:19:22 +0000 (07:19 +0000)]
Merge branch 'win32-use-g-stat' into 'master'

gtkiconcache: Use g_stat instead of fstat

See merge request GNOME/gtk!2019

5 years agoMake gtk_file_chooser_get_filter work for portal case
Michael Weghorn [Sat, 23 May 2020 12:37:24 +0000 (14:37 +0200)]
Make gtk_file_chooser_get_filter work for portal case

This makes 'gtk_file_chooser_get_filter' work for the
portal native file chooser by handling the corresponding
'current_filter' argument in the response retrieved via
D-Bus.

In order to try to map the retrieved 'current_filter' to one
of the existing list of filters, use the retrieved filter's name,
similar to how xdg-desktop-portal-gtk does it when evaluating the
'current_filter' input parameter in 'options'.)

Note: This depends on the following merge/pull requests
which fix the filter handling in gtk for native file choosers
and introduce the 'current_filter' handling for FileChooser portal.

* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1959
* https://github.com/flatpak/xdg-desktop-portal/pull/493
* https://github.com/flatpak/xdg-desktop-portal-gtk/pull/311

This fixes #1820 for desktop portal case.

Fixes: #1820
5 years agofilechoosernative: Make get_filter work for (non-portal) native chooser
Michael Weghorn [Sat, 23 May 2020 11:38:54 +0000 (13:38 +0200)]
filechoosernative: Make get_filter work for (non-portal) native chooser

'gtk_file_chooser_get_filter' did not work for GtkFileChooserNative,
since the previous way did not properly handle the delegate dialog,
s.a. commit a136cbae8f8848d49976512f7f0ec73137428ea0
("filechoosernative: forward current_filter to delegate dialog",
2018-11-29) for details, wich basiscally fixed the same thing for
the 'gtk_file_chooser_set_filter' case.

This fixes #1820 for the fallback dialog. A solution for the portal
one (which also requires changes to xdg-desktop-portal and
xdg-desktop-portal-gtk as well) will be suggested in a subsequent step.

Bug: #1820

5 years agogdk: Drop gdk_device_set_axis_use
Matthias Clasen [Tue, 9 Jun 2020 19:15:51 +0000 (15:15 -0400)]
gdk: Drop gdk_device_set_axis_use

If you need some axes changed, you can just flip
the values when you receive them.

5 years agogdk: Drop gdk_device_get/set_keys
Matthias Clasen [Tue, 9 Jun 2020 19:06:38 +0000 (15:06 -0400)]
gdk: Drop gdk_device_get/set_keys

This functionality was only ever half-implemented
on X11, and is not useful enough to keep around.

5 years agox11: Stop setting device keys
Matthias Clasen [Tue, 9 Jun 2020 19:05:55 +0000 (15:05 -0400)]
x11: Stop setting device keys

This is very vestigial functionality, and basically
unused.

5 years agoAddress review comments
Matthias Clasen [Tue, 9 Jun 2020 18:13:22 +0000 (14:13 -0400)]
Address review comments

We were casting scroll events to motion events
rather carelessly. Don't do that.

5 years agogdk: Add documentation
Matthias Clasen [Tue, 9 Jun 2020 17:59:26 +0000 (13:59 -0400)]
gdk: Add documentation

Add some useful information about event history.

5 years agogdk: Rename gdk_motion_event_get_history
Matthias Clasen [Tue, 9 Jun 2020 17:40:26 +0000 (13:40 -0400)]
gdk: Rename gdk_motion_event_get_history

Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.

Update the docs, and all callers.

5 years agogdk: Shrink GdkTimeCoord
Matthias Clasen [Tue, 9 Jun 2020 17:38:48 +0000 (13:38 -0400)]
gdk: Shrink GdkTimeCoord

There is really no need to store 128 doubles as axes,
ever. We can do just fine with 10. At the same time,
add a GdkAxisFlags member, so we can interpret the
values without having to go chasing the right device
for this information.

5 years agogdk: Add scroll delta x/y as device axes
Matthias Clasen [Tue, 9 Jun 2020 17:41:07 +0000 (13:41 -0400)]
gdk: Add scroll delta x/y as device axes

They really are axes, and having them present
in these enums lets use store delta values in
GdkTimeCoord for keeping history.

5 years agoKeep scroll history
Matthias Clasen [Tue, 9 Jun 2020 00:29:38 +0000 (20:29 -0400)]
Keep scroll history

Similar to how we keep motion history for compressed
events, keep scroll history for compressed scroll
events.

5 years agogdk: Compress scroll events
Matthias Clasen [Mon, 8 Jun 2020 22:07:40 +0000 (18:07 -0400)]
gdk: Compress scroll events

Only return one accumulated scroll event per frame.
Compress them by adding up the deltas.

Still missing: a way to capture history, like
we do for motion events.

Fixes: #2800